// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

pub mod disk_cmd;
use disk_cmd::*;

// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn list_path_files(path: &str) -> Vec<PathNode> {
    return disk_cmd::list_path_files(path);
}

#[tauri::command]
fn root_path() -> Vec<String> {
    return disk_cmd::root_path();
}

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![list_path_files, root_path])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
